The present invention relates to a method of coding a moving image and its apparatus, and a moving image coding and decoding system.
For coding a moving image by a motion compensation inter-frame coding apparatus for coding for the purpose of communications or the like, hitherto, the method disclosed in the ISO/IEC JTC/SC29/WG11 MEPG93/457 Test Model 5 Rev. 2 (hereafter called TM5) is employed. The prior art by TM5 (intra-slice method) is described below.
FIG. 12 shows an example of dividing the frame for coding the digital image of ITU/R Rec. 601 525 format by the intra-slice method described in the TM5. In the intra-slice method, the intra-frame coding region is set in a region called a slice of which height is worth pixels of a natural number multiple of 16 (set at a multiple of one in FIG. 12), and width is the overall width of the frame. FIG. 12 shows an example of dividing into 30 regions comprising vertical 16 pixelsxc3x97lateral 720 pixels, and each region is a unit for intra-frame coding. In FIG. 12, 30 slices are sequentially numbered 1 to 30 from the top of the frame, and each slice can be identified by the number.
In the intra-slice method, as shown in FIG. 12, when the coding frame number is 1, slice 1 is coded, when the coding frame number is 2, slice 2 is coded, and similarly when the coding frame number reaches 30, slice 30 is coded. When the slice reaches the lowest end of the frame, back to slice 1 at the highest end of the next coding frame, similarly thereafter, when the coding frame number is K, supposing the remainder of dividing K by 30 to be L, slice (L+1) is coded by intra-frame coding.
When coded in this manner, since motion is not compensated in the intra-frame coding region, the image quality is poor as compared with the region coded without intra-frame coding.
When coded by the intra-slice method, since the shape of the intra-frame coding region is long laterally, the contacting boundary of the region of intra-frame coding and the region not performing intra-frame coding in the frame is long, and the difference in image quality is very obvious. Besides, since the region of intra-frame coding moves periodically, periodic fluctuations occur in the image by decoding the coded result, and the subjective image quality of the decoded image deteriorates.
Thus, in the prior art, because of the shape of the region of intra-frame coding and periodic repeating of regions, periodic fluctuations occur in the image by decoding the coded result, and the image quality of the decoded image is inferior.
It is found that the subjective image quality is higher in the case of concentrated distribution of macro blocks of intra-frame coding than in the case of sparse distribution in the entire frame, and hence to solve the above problems, it is an object of the invention to enhance the image quality so that the difference in image quality between regions may be less obvious, by determining the regions of intra-frame coding so as to shorten the contacting boundary of the region of intra-frame coding and the region not performing intra-frame coding. In particular, in the case of coding by MPEG2, since there is a restriction that arbitrary macro blocks (MB) must be coded as intra MB within 132 frames, for example, when coding signals of Standard Television (STV) by MPEG2, since there are 44xc3x9730=1320 MB in the frames, in the case the number of forced intra MB being same in the frames, the frame must be divided at least into 132 divisions, and 10 forced intra MB must be disposed in the frame. Except in the case of the number of divisions of the frame being equal to the number of MB in the frame, the forced intra MB included in the frame of the invention may be disposed together, and the subjective image quality of coded image can be enhanced. Moreover, by determining the regions of intra-frame coding by an irregular sequence, periodic fluctuations by intra-frame coded portions can be eliminated, and a high image quality is achieved.